package com.ithema.mArrayList;

import com.ithema.domain.Movie;

import java.util.ArrayList;

public class Testk {
    public static void main(String[] args) {
        ArrayList<Movie> list = new ArrayList<>();
        Movie m=new Movie("唐山大地震","冯小刚","灾难");
        Movie m1=new Movie("羞羞的铁拳","宋阳","喜剧");
        Movie m2=new Movie("集结号","冯小刚","历史");
        list.add(m);
        list.add(m1);
        list.add(m2);
        for (int i = 0; i < list.size(); i++) {
            if("冯小刚".equals(list.get(i).getDirector())){
                System.out.println(list.get(i).getTitle()+"-"+list.get(i).getDirector()+"-"+list.get(i).getType());
            }
        }
    }
}
